/**
 * @file nguser.h
 * @author Suk Robert Koh (srkoh87z@gmail.com)
 *
 * @brief Holds information about connected user
 */

#ifndef NGCLIENT_H_
#define NGCLIENT_H_

#include <stdlib.h>
#include "../common/message/ngmessagequeue.h"
#include "../common/ngproperties.h"

/**
 * @class	NGUser	Container class for connected user information
 */
class NGUser
{
public:
	NGUser();
	virtual ~NGUser();

	BOOL connected;									/** To determine if this object is being used */
	SOCKET socket;									/** Socket descriptor of the user */
	DWORD userId;									/** User's ID relative to NGine */
	DWORD trafficTick;								/** Used for traffic check */
	DWORD trafficCount;								/** Number of messages sent by this user */
	NGMessageQueue *sendQueue;						/** Send message queue */
	char *recvBuffer;								/** Buffer used to temporarily hold received data */
	int bufferPosition;								/** Current position in recvBuffer */
};

#endif /* NGCLIENT_H_ */
